﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Team6_Algorithms.Filters;
using System.Drawing;

namespace VisionApplication
{
    class Sobel: VisionAlgorithm
    {
        public Masks m = new Masks();
        List<Mask> ML = new List<Mask>();
        public Sobel(String name, string[] required) : base(name, required) {
            ML.Add(m.SobelHori);
            ML.Add(m.SobelVerti);
        }

        public override System.Drawing.Bitmap DoAlgorithm(System.Drawing.Bitmap sourceImage, Object obj)
        {
            Bitmap returnImage = new Bitmap(sourceImage);

            CombinedMasking.applyFilter(returnImage, ML, settings.Max);
            this.Image = returnImage;
            return returnImage;

        }
    }
}
